import java.io.IOException;
import java.util.Observable;
import java.util.Observer;

import javax.swing.JOptionPane;

import com.lloseng.ocsf.server.AbstractServer;
import com.lloseng.ocsf.server.ConnectionToClient;


public class Server extends AbstractServer implements Observer{
int i =0;
	private Othello o;
	public Server(int port, Othello o) {
		super(port);
		this.o = o;
	}

	@Override
	public void sendToAllClients(Object msg) {
		super.sendToAllClients(msg);
	}

	@Override
	protected void clientConnected(ConnectionToClient client) {
			sendToAllClients(o.getGameBoard());
		
	}

	@Override
	protected void handleMessageFromClient(Object msg, ConnectionToClient client) {
		sendToAllClients(msg);
	}
	//สร้างserverและตัวเกม
	

	@Override
	public void update(Observable arg0, Object arg1) {
		// TODO Auto-generated method stub
		
	}
}
